package ooptest;

public class Circle {
    private double banjing;

    public double getBanjing() {
        return banjing;
    }

    public void setBanjing(double banjing) {
        this.banjing = banjing;
    }

    public double mianji(){
        return 3.14*banjing*banjing;
    }
    public double zhouchang(){
        return 2*3.14*banjing;
    }

    public static void main(String[] args) {
        Circle c=new Circle();
        c.setBanjing(511.4);
        System.out.println("半径："+c.getBanjing()+"\n面积："+ c.mianji()+"\n周长：" +c.zhouchang());

    }
}
